package com.szqhyxj.youxiangju.biz.equipmentActivation.headIdCard;

import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import java.io.File;

import io.reactivex.Observable;
import retrofit2.Retrofit;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/11/1.
 */

public class HeadIdCardModel {

    public interface HeadIdCardService{

        @FormUrlEncoded
        @POST("user/certification/uploadhander")
        Observable<BaseResult> uploadHand(@Field("handerPath") String handurl);
    }


    public static Observable<BaseResult> getuploadHand(HeadIcCardEntity headIcCardEntity){
        return RetrofitFacade.Companion.getRetrofit()
                .create(HeadIdCardService.class)
                .uploadHand(
                        headIcCardEntity.getHeadIcCardUrl()
                );

    }
    /**
     * Created by leung on 2018/11/1.
     */

    public static class HeadIcCardEntity {


        public File getHeadIcCardFile() {
            return HeadIcCardFile;
        }

        public String getHeadIcCardUrl() {
            return HeadIcCardUrl;
        }

        public void setHeadIcCardUrl(String headIcCardUrl) {
            HeadIcCardUrl = headIcCardUrl;
        }

        private String HeadIcCardUrl;

        public void setHeadIcCardFile(File headIcCardFile) {
            HeadIcCardFile = headIcCardFile;
        }

        File HeadIcCardFile;

    }
}
